<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'updateindus.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>/css/biaoge.css" />

	</head>
	<script type="text/javascript"
		src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
	<script type="text/javascript">
    function update(){
     var count = $('input:checked').length;
     if(count!=0){
       document.updateindus.submit();
       return true;
     }else{
       alert("未选中！");
       return false;
     }
    }
  </script>

	<body>
		<div style="margin-left: 250px; margin-top: 70px">
			&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;
			&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;
			&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;
			<font size="3" color="blue">修改工厂信息</font>
			<form action="updateindus" method="post" onsubmit="return update()">
				<input type="hidden" name="indusid" value="${indus.industryId}">
				<table id="mytable">
					<tr>
						<th>
							工厂名称：
						</th>
						<td>
							<input type="text" name="indusname" value="${indus.industryName}">
						</td>
						<tr>
							<tr>
								<th>
									工厂地址：
								</th>
								<td>
									<input type="text" name="indusaddress"
										value="${indus.industryAddress}">
								</td>
								<tr>
									<tr>
										<th>
											工厂负责人：
										</th>
										<td>
											<input type="text" name="induspal"
												value="${indus.industryprincipal}">
										</td>
										<tr>
											<tr>
												<th>
													电话号码：
												</th>
												<td>
													<input type="text" name="industel"
														value="${indus.industryTelephone}">
												</td>
												<tr>
													<tr>
														<th>
															邮箱：
														</th>
														<td>
															<input type="text" name="indusmail"
																value="${indus.industryEmail}">
														</td>
														<tr>
															<tr>
																<th>
																	当前主营业务：
																</th>
																<td>
																	<c:forEach items="${zhuanlist}" var="zhuan">
        ${zhuan.productName}
        </c:forEach>
																</td>
																<tr>
																	<tr>
																		<th>
																			重新选择主营业务：
																		</th>
																		<td>
																			<c:forEach items="${prolist}" var="pro">
																				<input type="checkbox" name="induspro"
																					value="${pro.productId}">${pro.productName}
        </c:forEach>
																		</td>
																		<tr>
				</table>
				<br>
				&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
				&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp; &nbsp;&nbsp;&nbsp;
				<input type="submit" value="确认修改">
				<input type="button" value="返回"
					onclick="window.location='industryinformation'">
				
			</form>
		</div>
	</body>
</html>
